package graph.drawingshapes.tools
{
	public class LineDrawingTool extends SimpleDrawingTool
	{
		public static const NAME:String = "LineDrawingTool"
		public override function get getName():String 
		{
			return NAME;
		}
		
		public static const DefaultLineThickness:Number = 1.0;
		[Bindable]
		private var _lineThickness:Number = DefaultLineThickness;
		[Bindable]
		public function get lineThickness():Number
		{
			return this._lineThickness;
		}
		public function set lineThickness(value:Number):void
		{
			if (value != this.lineThickness)
			{
				this._lineThickness = value;
				dispatchEvent(new RedrawEvent());
			}
		}
		
		public function LineDrawingTool(size:Number=DefaultSize, lineThickness:Number=DefaultLineThickness, color:uint=DefaultColor, alpha:Number=DefaultAlpha)
		{
			super(size, color, alpha);
			this.lineThickness = lineThickness;
		}
		
		protected override function initDrawing():void
		{
			this.graphics.lineStyle(this.lineThickness, this.color, this.alpha);
		}
	}
}